package com.zlp.service;

import com.zlp.dto.req.PermissionTreeReq;
import com.zlp.dto.resp.PermissionTreeResp;
import com.zlp.entity.Permission;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 后台用户权限表 服务类
 * </p>
 *
 * @author LiPing.Zou
 * @since 2021-03-12
 */
public interface PermissionService extends IService<Permission> {

    /**
     * 获取权限集合根据用户ID
     * @param userId 用户ID
     * @date: 2021/3/12 21:34
     * @return: java.util.List<com.zlp.entity.Permission>
     */
    List<Permission> getPermissionList(Long userId);


    /**
     * 获取权限树结构
     * @param roleId
     * @date: 2021/3/9 14:33
     * @return: java.util.List<com.zlp.dto.PermissionTreeResp>
     */
    List<PermissionTreeResp> getPermissionTreeList(Long roleId);

    /**
     * 保存权限
     * @param permissionTreeReq
     * @date: 2021/3/9 21:32
     * @return: java.lang.Boolean
     */
    Boolean savePermission(PermissionTreeReq permissionTreeReq);
}
